/*
 * @Author: szx
 * @Date: 2021-12-02 16:35:44
 * @LastEditTime: 2021-12-02 16:41:34
 * @Description:
 * @FilePath: \leetcode\500-599\557\557.js
 */
/**
 * @param {string} s
 * @return {string}
 */
var reverseWords = function (s) {
    return (res = s
        .trim()
        .split(' ')
        .map((item, index) => {
            return item.split('').reverse().join('');
        })
        .join(' '));
};
console.log(reverseWords("Let's take LeetCode contest"));
